Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup dead code and incorrect use of go routine in context pkg #1320

Merged

Conversation

tharun208
Copy link
Contributor

What was changed

Cleaned up dead code in context pkg and replaced incorrect use of go routine in propogateCancel with a panic msg

Why?

Clean tech-debt from context pkg

Checklist

  1. Closes Clean up internal/context #1270

  2. How was this tested:
    local test-suites

  3. Any docs updates needed?
    No

@tharun208 tharun208 requested a review from a team as a code owner December 14, 2023 07:21
@CLAassistant
Copy link

CLAassistant commented Dec 14, 2023

CLA assistant check
All committers have signed the CLA.

@Quinn-With-Two-Ns
Copy link
Contributor

Thanks @tharun208

Now another approach instead of deleting the code would be to make it work. That would be a non trivial effort since it isn't working right now and is untested. Given that no users has asked for these features, and to implement properly I think they would require generating timer commands I am fine to remove it.

There are still some references to the removed code such as:

That we should remove

@tharun208 tharun208 force-pushed the chore/cleanup_internal_context branch from 6b296fc to 01c6e4e Compare December 14, 2023 16:03
@tharun208
Copy link
Contributor Author

@Quinn-With-Two-Ns done removed the mentioned snippet

@tharun208 tharun208 force-pushed the chore/cleanup_internal_context branch from 01c6e4e to abba2c2 Compare December 14, 2023 16:07
s.AddReceive(child.Done(), func(c ReceiveChannel, more bool) {})
s.Select(parent)
}()
panic("parent context not found")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this panic statement is wrong and misleading. The issue is not that the parent context is not found, the issue is the parent context is cancellable, but does not have a *cancelCtx in it's hierarchy. We should reflect that in the panic message

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the message

@tharun208 tharun208 force-pushed the chore/cleanup_internal_context branch from abba2c2 to 04f8e83 Compare December 15, 2023 19:27
Copy link
Contributor

@Quinn-With-Two-Ns Quinn-With-Two-Ns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@Quinn-With-Two-Ns Quinn-With-Two-Ns merged commit f823b64 into temporalio:master Dec 16, 2023
12 checks passed
@tharun208 tharun208 deleted the chore/cleanup_internal_context branch September 18, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up internal/context
3 participants